Current File : //usr/lib64/nagios/plugins/watchcxs
#!/bin/bash


                                        ########################################################################
                                        #                    Nagios Bash Script Plugin                         #
                                        #                       Plugin to check CXS                            #
                                        #                                                                      # 
                                        #                                                                      #
                                        # #       #       # ######  ######  #####    ###   #    # #      ##### # 
                                        #  #     # #     #  #       #    #  #       #   #  #    # #      #     #
                                        #   #   #   #   #   ######  ######  #####  #     # #    # #      ##### #
                                        #    # #     # #    #       #    #      #   #   #  #    # #          # # 
                                        #     #       #     ######  ######  #####    ###   ###### ###### ##### #
                                        ########################################################################



service cxswatch status
if [[ $? -eq 0 ]]; then
    
    echo "OK: Service is Running"
    
    exit 0

elif [[ $? -ne 0 ]]; then

    echo "Service Not Running"

    exit 0

 else

        echo "Unknown"

        exit 3

fi